package com.demo2.servlet;

import com.minicat.servlet.HttpServlet;
import com.minicat.servlet.Request;
import com.minicat.servlet.Response;

import java.util.concurrent.TimeUnit;

/**
 * @author liangzj
 * @date 2021/3/28 21:59
 */
public class SleepServlet extends HttpServlet {


    @Override
    public void doGet(Request request, Response response) {
        doPost(request, response);
    }

    @Override
    public void doPost(Request request, Response response) {
        try {
            TimeUnit.HOURS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
